package cn.z2huo.demo.model.dataobject.role;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>该 DO 对应数据库表为 z2huo_role_permission_relation
 * <p>
 * 
 * @author z2huo
 * @date   2025-06-13
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("z2huo_role_permission_relation")
public class RolePermissionRelationDO implements Serializable {

    @Serial
    private static final long serialVersionUID = -7214607667416439597L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 角色ID
     */
    private Long roleId;

    /**
     * 权限ID
     */
    private Long permissionId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 最后操作时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime operateTime;

    /**
     * 创建人代码
     */
    @TableField(fill = FieldFill.INSERT)
    private String createByCode;

    /**
     * 最后操作人代码
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String operateByCode;
}